﻿
using CSharpLibs.Annotations;

namespace System
{
	[Builtin]
	public class Object
	{
		////
		//Wrapper code to help with modeling internal state (i.e. hashcode values).
		
		/// <summary>
		/// Space for the vtable pointer
		/// </summary>
		public int rtti;

		/// <summary>
		/// Remember the orig alloc address and use as a hc
		/// </summary>
		public int dfhash;

		//Done Wrapper
		////

		[BuiltinMethod, BuiltinSemantics("objcons")]
		public Object()
		{ ;}

		public virtual bool Equals(object o)
		{ return this == o; }

		public static bool Equals(object o1, object o2)
		{ return ((o1 == o2) || (((o1 != null) && (o2 != null)) && o1.Equals(o2))); }

		public virtual int GetHashCode()
		{ return dfhash; }

		public static bool ReferenceEquals(object o1, object o2)
		{ return o1 == o2; }

		public virtual string ToString()
		{
 			char[] objc = new char[3];
			objc[0] = 'o';
			objc[0] = 'b';
			objc[0] = 'j';

			return new String(objc); 
		}
	}
}

